package com.wfl.sampling.dao;

import com.wfl.sampling.entity.Activity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface ActivityDao {
    //查询所有活动
    List<Activity> queryAllActivity();
    //通过条件查询活动
    List<Activity> queryActivityByConditionWithoutLimit(Activity activity);
    //通过条件查询活动
    List<Activity> queryActivityByCondition(Activity activity);
    //通过活动id查询活动
    List<Activity> queryActivityByActivityId(Integer activityId);
    //通过活动id删除活动
    boolean insertActivity(Activity activity);
    int updateActivityByactivityId(Activity activity);
    //查询最大id
    List<Activity> findMaxId();
    //通过活动id查询我的一系列活动
    List<Activity> findActivitiesByActivityIds(@Param("activityIds") List<Integer> activityIds);


    void insertActivityParticipant(Integer id, Integer initiatorId, int level);
}
